//简历的请求封装
import request from "@/utils/http.ts"

//1.添加简历
export const addResumeAPI = (data: any) => {
    return request({
        url: 'resume/addResume',
        method: 'post',
        data: {
            resumeJobseekerId: data.resumeJobseekerId,//求职者id
            resumeAvatar:data.resumeAvatar,//头像
            resumeUsername: data.resumeUsername,
            resumeGender: data.resumeGender,
            resumeAge: data.resumeAge,
            resumePhone: data.resumePhone,
            resumeAddress: data.resumeAddress,
            resumeEducationSchool: data.resumeEducationSchool,
            resumeEducationMajor: data.resumeEducationMajor,
            resumeEducationDegree: data.resumeEducationDegree,
            resumeSchoolExperience: data.resumeSchoolExperience,
            resumeEducationEndDate: data.resumeEducationEndDate,
            resumeWorkExperience: data.resumeWorkExperience,
            resumeSkillDescription: data.resumeSkillDescription,
            resumeCertificatesVerified: data.resumeCertificatesVerified,
            resumeCertificates: data.resumeCertificates,
            resumePersonalProfile: data.resumePersonalProfile,
            resumePrivacySetting: data.resumePrivacySetting,//简历隐私设置
            resumeExpectedJob: data.resumeExpectedJob,//期望工作
            resumeExpectedWorkAddress: data.resumeExpectedWorkAddress,//期望工作地点
            resumeExpectedSalary: data.resumeExpectedSalary,//期望薪资
            resumeExpectedSalaryType: data.resumeExpectedSalaryType,//期望薪资类型
        }
    })
}
//2.查询简历详情根据JobseekerId
export const getResumeDetailByJobseekerIdAPI = (resumeJobseekerId: string) => {
    return request({
        url: 'resume/getResumeDetailByJobseekerId',
        method: 'post',
        params: {
            resumeJobseekerId: resumeJobseekerId
        }
    })
}
//3.修改简历根据简历Id
export const updateResumeByIdAPI = (data: any) => {
    return request({
        url: 'resume/updateResumeById',
        method: 'post',
        data: {
            resumeId: data.resumeId,
            resumeAvatar:data.resumeAvatar,//头像
            resumeUsername: data.resumeUsername,
            resumeGender: data.resumeGender,
            resumeAge: data.resumeAge,
            resumePhone: data.resumePhone,
            resumeAddress: data.resumeAddress,
            resumeEducationSchool: data.resumeEducationSchool,
            resumeEducationMajor: data.resumeEducationMajor,
            resumeEducationDegree: data.resumeEducationDegree,
            resumeSchoolExperience: data.resumeSchoolExperience,
            resumeEducationEndDate: data.resumeEducationEndDate,
            resumeWorkExperience: data.resumeWorkExperience,
            resumeSkillDescription: data.resumeSkillDescription,
            resumeCertificates: data.resumeCertificates,
            resumePersonalProfile: data.resumePersonalProfile,
            resumePrivacySetting: data.resumePrivacySetting,//简历隐私设置
            resumeExpectedJob: data.resumeExpectedJob,//期望工作
            resumeExpectedWorkAddress: data.resumeExpectedWorkAddress,//期望工作地点
            resumeExpectedSalary: data.resumeExpectedSalary,//期望薪资
            resumeExpectedSalaryType: data.resumeExpectedSalaryType,//期望薪资类型
        }
    })
}
//4.删除简历根据简历Id
export const deleteResumeByIdAPI = (resumeId: string) => {
    return request({
        url: 'resume/deleteResumeById',
        method: 'post',
        params: {
            resumeId: resumeId
        }
    })
}
//5.管理员-修改荣誉认证状态
export const updateResumeVerifiedAPI = (data: any) => {
    return request({
        url: 'resume/updateResumeVerified',
        method: 'post',
        params: {
            resumeId: data.resumeId,
            resumeCertificatesVerified: data.resumeCertificatesVerified,
        }
    })
}
//6.分页查询简历列表
export const pageResumeAPI = (data: any) => {
    return request({
        url: 'resume/pageResume',
        method: 'post',
        data: {
            pageCurrent: data.pageCurrent,
            pageSize: data.pageSize,

            resumePrivacySetting: data.resumePrivacySetting,
        }
    })
}
//7.根据简历Id查询简历详情
export const getResumeByIdAPI = (data: any) => {
    return request({
        url: 'resume/getResumeDetailByResumeId',
        method: 'post',
        params: {
            resumeId: data.resumeId,
        }
    })
}
